﻿
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace Ecobee.Net
{
	/// <summary>
	/// The Schedule object defining the program schedule. 
	/// </summary>
	public class ScheduleTime : ApiObject
	{
		#region Private Fields
		private string _climateReference = string.Empty;
		private int _index = 0;
		#endregion

		[JsonIgnore]
		public override string UniqueKey
		{
			get
			{
				return string.Format("{}-{1}", this.ClimateReference, this.Index.ToString());
			}
		}

		[JsonIgnore]
		public string ClimateReference
		{
			get
			{
				return _climateReference;
			}
			set
			{
				_climateReference= value;
			}
		}

		[JsonIgnore]
		public int Index
		{
			get
			{
				return _index;
			}
			set
			{
				_index= value;
			}
		}

		protected override string OnDeserializeKeyValue(dynamic dataObject)
		{
			return string.Empty;
		}
	}
}
